package com.xiaoyu.lanling.event.coin

import `in`.srain.cube.request.JsonData
import com.xiaoyu.base.event.BaseJsonEvent
import com.xiaoyu.base.utils.JsonUtil
import com.xiaoyu.lanling.feature.coin.model.CoinExchangeItem

class CoinExchangeListEvent(requestTag: Any, jsonData: JsonData) : BaseJsonEvent(requestTag, jsonData) {
    val pointBalance = jsonData.optInt("pointBalance")
    val products = JsonUtil.convertToList(jsonData.optJson("products")) { item -> CoinExchangeItem(item) }
}